package edu.zut.cs.software.cms.module.course.domain;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnore;

import edu.zut.cs.software.cms.base.domain.BaseEntity;
@Entity
@Table(name = "T_CourseRecord")
/**
 * 
 * @author 24372
 *
 */
public class CourseRecord extends BaseEntity<Long>{
	/**
	 * 
	 */
	private static final long serialVersionUID = 5050096607690770959L;
	/**
	 * Id of Course
	 */
	@Column
	String code;
	/**
	 * Course name
	 */
	@Column
	String name;
	/**
	 * Teacher of Course
	 */
	@Column
	String teaching;
	/**
	 * date of Course
	 */
	@Column
	String Date;
	/**
	 * 
	 * @return Id of Course
	 */
	@OneToMany(mappedBy = "courserecord", cascade = CascadeType.REMOVE, fetch = FetchType.EAGER)
	@JsonIgnore
	List<Course> course;
	public String getCode() {
		return code;
	}
	/**
	 * 
	 * @param code
	 */
	public void setCode(String code) {
		this.code = code;
	}
	/**
	 * 
	 * @return Course name
	 */
	public String getName() {
		return name;
	}
	/**
	 * 
	 * @param name
	 */
	public void setName(String name) {
		this.name = name;
	}
	/**
	 * 
	 * @return Teacher of Course
	 */
	public String getTeaching() {
		return teaching;
	}
	/**
	 * 
	 * @param teaching
	 */
	public void setTeaching(String teaching) {
		this.teaching = teaching;
	}
	/**
	 * 
	 * @return date of course
	 */
	public String getDate() {
		return Date;
	}
	/**
	 * 
	 * @param date
	 */
	public void setDate(String date) {
		Date = date;
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	}
}
